/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVA-Data-Structures-and-Algorithms PROJECT
 * All Rights Reserved.
 */

package 简单数组栈;

/**
 * @Description
 * @Author 俊昭
 * @Date 2022/4/29
 */
public class ArrayStackTest {
    public static void main(String[] args) {
        ArrayStack as = new ArrayStack(10);
        for (int i = 0; i < 10; i++) {
            as.push(i + 1);
        }
        as.showInOrder();
        as.showReversed();
        for (int i = 0; i < 10; i++) {
            System.out.println(as.pop());
        }
        if (as.isEmpty()) {
            System.out.println("栈空");
        } else {
            System.out.println("栈不空");
        }

    }
}
